home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.teleport.com!sschaem
- From: sschaem@teleport.com (Stephan Schaem)
- Newsgroups: comp.sys.amiga.programmer,comp.sys.amiga.games,comp.sys.amiga.hardware,comp.sys.amiga.misc,comp.sys.amiga.graphics
- Subject: Re: FPU and games?
- Date: 30 Jan 1996 04:31:07 GMT
- Organization: Teleport - Portland's Public Access (503) 220-1016
- Message-ID: <4ek6ub$mrq@maureen.teleport.com>
- References: <38232041@kone.fipnet.fi> <volker.0ed8@vb.franken.de> <38232075@kone.fipnet.fi> <volker.0ehd@vb.franken.de> <38232112@kone.fipnet.fi> <volker.0en5@vb.franken.de> <38232154@kone.fipnet.fi> <wfblanDLozuJ.64s@netcom.com>
- NNTP-Posting-Host: kelly.teleport.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Wells Fargo Bank (wfblan@netcom.com) wrote:
- : Jyrki Saarinen (jsaarinen@kone.fipnet.fi) wrote:
-
- : : > It is. fmove.l fpx,dy converts an 80bit floating point number to a
- : : > 32bit signed integer.
-
- : : Ok, great. I stupidly thought that fint is needed when it was
- : : not.
-
- : : Now, I can see how FPU can be used in perspective correct
- : : texture mapping. Everything could be fitted into registers..
-
- : : Hmm. I tested a loop like this:
-
- : : fmove fp2,fp6 ;v<<8/z
- : : fmove fp0,fp7 ;u/z
- : : fdiv fp4,fp6 ;v<<8 = v<<8/z / 1/z
- : : fdiv fp4,fp7 ;u = u/z / 1/z
- : : fmove.l fp6,d0
- : : fmove.b fp7,d0
- : : move.b (a0,d0.l),(a1)+
- : : fadd fp2,fp3 ;v/z+=v/z step
- : : fadd fp0,fp1 ;u/z+=u/z step
- : : fadd fp5,fp4 ;1/z+=1/z step
-
- : : Now, with those fmoves to data registers this loop
- : : was very slow. Any reason why? Without those fmoves
- : : this loop was about the clock cycles the 040 manual
- : : tells.
-
- : : -- _
- : : a Stellar programmer _ //
- : : "Amiga - back for the future" \X/
-
-
- : So am I correct to understand that you are saying that using the above loop
- : without the fmoves, it is pheasable to use the 040's FPU to improve texture
- : maped games and programs? And wouldn't this be all the more true on an 060?
-
- The above on a 040 should be ~36 cycles (I'm gessing based on the
- fact that the major fpu inst take 2 head/ tail cycle) without the memory
- move, but I can see a gouraud shading interger code fitting in the 18
- possible tail cycle. So perspective corrected texture mapping+gouraud
- lighting in ~40 cycles, nice but about 5 to 10 time slower then constant
- Z lighted texture mapping (like "In the shaow" use for the scenery).
-
- Stephan
-